<?php

namespace Ignus\View\Node\Expression\Binary;

use Ignus\View\Node\Expression\Binary;
use Ignus\View\Compiler;

class Power extends Binary
{
    public function compile(Compiler $compiler)
    {
        $compiler
            ->raw('pow(')
            ->subcompile($this->getNode('left'))
            ->raw(', ')
            ->subcompile($this->getNode('right'))
            ->raw(')');
    }

    public function operator(Compiler $compiler)
    {
        return $compiler->raw('**');
    }
}
